﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserRoleList.aspx.cs" Inherits="Admin_UserRoleList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../css/Site.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
    <div>
    
        <asp:GridView ID="gvUserRole" runat="server" AutoGenerateColumns="False" 
             onrowcommand="gvUserRole_RowCommand"  DataKeyNames="ID"
            onrowdeleting="gvUserRole_RowDeleting" 
            onrowediting="gvUserRole_RowEditing" ShowFooter="True" 
            BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px"  style="width:100%; text-align:center;"
            CellPadding="2" ForeColor="Black" GridLines="None" 
            onrowcancelingedit="gvUserRole_RowCancelingEdit" 
            onrowupdating="gvUserRole_RowUpdating">
            <AlternatingRowStyle BackColor="PaleGoldenrod"/>
            <Columns>
            <asp:TemplateField HeaderText="角色名称"  >
                    <EditItemTemplate>
                        <asp:TextBox ID="txtEditName" runat="server" Width="50" Text='<%# Bind("Name") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("Name") %>'></asp:Label>
                    </ItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="txtNewName" runat="server" Width="50"></asp:TextBox>
                    </FooterTemplate>

                    <FooterStyle HorizontalAlign="Center" VerticalAlign="Middle" />

                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="300px" />
                </asp:TemplateField>
 
             <asp:TemplateField ShowHeader="false" InsertVisible="False">
                <EditItemTemplate>
                <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True"                                 
                 CommandName="Update" Text="更新"></asp:LinkButton>                              
                 <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False"                                  
                 CommandName="Cancel" Text="取消"></asp:LinkButton>
                </EditItemTemplate>
                <ItemTemplate>                             
                <asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="False"                                  
                CommandName="Edit" Text="编辑"></asp:LinkButton>  
                <asp:LinkButton ID="LinkButton4" runat="server" CausesValidation="False" 
                        CommandName="Delete"    Text="删除"></asp:LinkButton>
                       
                </ItemTemplate>
                <FooterTemplate>
                        <asp:LinkButton ID="LinkButton5" runat="server" CausesValidation="True" CommandName="Insert"
                            Text="插入"></asp:LinkButton>
                    </FooterTemplate>

                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="Tan" />
            <HeaderStyle BackColor="Tan" Font-Bold="True" />
            
        </asp:GridView>
         
    
    </div>
    </form>
</body>
</html>
